home *** CD-ROM | disk | FTP | other *** search
- //╔══════════════════════════════════════════════════════════════════════════╗
- //║ ║
- //║ This example show how to use the Linear FrameBuffer with Vesa 2.0 ║
- //║ ║
- //║ ║
- //║ ║
- //╚══════════════════════════════════════════════════════════════════════════╝
-
- #include <process.h>
- #include "..\resource\eos.h"
-
- void copyvideo(char *Addr_Buffer,char *Addr_File);
- #pragma aux copyvideo modify [eax edx esi edi] parm [edi] [esi] = \
- "add esi,10"\
- "mov edx,3c8h"\
- "xor al,al"\
- "out dx,al"\
- "inc dl"\
- "mov ecx,768"\
- "@@Ok1:"\
- "lodsb"\
- "out dx,al"\
- "loop @@Ok1"\
- "mov ecx,76800"\
- "rep movsd";
-
- void wait_();
- #pragma aux wait_ modify [eax]= \
- "xor ah,ah"\
- "int 16h";
-
- void test_vesa2()
- {
- char *Addr_Buffer;
- char *Addr_File;
- long Size_File;
-
- Addr_Buffer=Init_Vesa2(0x101,640*480);
- if ( Addr_Buffer==Off )
- Exit_Error (" ■ Mode SVGA not supported or VESA not found ! \x0D\x0A" \
- " To install a vesa driver, refer to your video card documentation. \x0D\x0A\x24");
- Addr_File=Load_Internal_File ("..\\DATA\\TEST640.DLZ",&Size_File);
- copyvideo(Addr_Buffer,Addr_File);
- wait_();
- Restore_Video_Mode();
- }
-
- void main(int argn, char **argv)
- {
- Init_EOS();
- test_vesa2();
- exit (0);
- }